cmake_minimum_required(VERSION 2.8.4)
project(DeepDR)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

set(LIBS
        pthread
        ${CMAKE_CURRENT_SOURCE_DIR}/caffe/lib/libcaffe.so
        dw
        primesieve
        ${LIBS}
)
set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmakeModules)


include(Utils)
include(Dependencies)

include_directories(
        src
        caffe/include
        backward-cpp
        Jinja2CppLight/src
        ori_code
        tools
)
link_directories(
        ${CMAKE_CURRENT_SOURCE_DIR}/caffe/lib
)

add_subdirectory(backward-cpp)

set(SOURCE_FILES ${SOURCE_FILES} ${backward_ENABLE})

add_subdirectory(Jinja2CppLight)
add_subdirectory(ori_code)
add_subdirectory(src)
add_subdirectory(server)
add_subdirectory(tools)
add_subdirectory(tests)

MESSAGE(${SOURCE_FILES})
add_executable(main.bin  main.cpp ${SOURCE_FILES})
target_link_libraries(main.bin ${LIBS})
add_backward(main.bin)
